﻿using Bot.Domain;
using Bot.Domain;
using Bot.Domain.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bot.Domain.BotImport
{
    public class EntityImportDataQueue
    {
        public EnumOperationStatus ProcessState { get; set; }
        public EnumImportHandleStatus Status { get; set; }
        public string FileName { get; set; }
        public string FailedPath { get; set; }
        public List<EntityImportDto> EntityImportDtoList { get; set; }    
        public Queue<dynamic> ImportDataQueue { get; set; }        
        public IList<string> ErrorMessages { get; set; }
        public string OperationName { get; set; }
        public string OperationId { get; set; }
        public int ProcessId { get; set; }
        public int ErrorCode { get; set; }

        public EntityImportDataQueue()
        {
            ImportDataQueue = new Queue<dynamic>();
            Status = EnumImportHandleStatus.Wait;
            ProcessState = EnumOperationStatus.Occupy;
            ErrorMessages = new List<string>();
        }
        public EntityImportDataQueue(EntityImportDataQueue entityImportDataQueue)
        {
            this.ProcessState = entityImportDataQueue.ProcessState;
            this.Status = entityImportDataQueue.Status;
            this.FileName = entityImportDataQueue.FileName;
            this.FailedPath = entityImportDataQueue.FailedPath;
            this.EntityImportDtoList = entityImportDataQueue.EntityImportDtoList;
            this.ImportDataQueue = entityImportDataQueue.ImportDataQueue;          
            this.ErrorMessages = entityImportDataQueue.ErrorMessages;
            this.OperationName = entityImportDataQueue.OperationName;
            this.OperationId = entityImportDataQueue.OperationId;
            this.ProcessId = entityImportDataQueue.ProcessId;
            this.ErrorCode = entityImportDataQueue.ErrorCode;
        }
    }
}
